package com.mtung.consumer;

import com.mtung.dubbo.proxy.RpcClientProxy;
import com.mtung.provider.api.UserService;

/**
 * @author : zhenguo.yao
 * @date : 2020/3/23 0023 16:49
 */
public class Consumer {
    public static void main(String[] args) {
        try {
            UserService userService = new RpcClientProxy().createClient(UserService.class);
            String user = userService.getUser(10L);
            System.out.println("result:" + user);
            int delUser = userService.delUser(1L);
            System.out.println("delUser:" + delUser);
            // 使用代理模式生成代理类
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
